home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
004
/
educat.arc
/
ALPHABYT.BAS
next >
Wrap
BASIC Source File
|
1986-06-20
|
3KB
|
91 lines
2 REM --TWO--------ALPHABETICAL ORDER------------------------------
10 REM ------------K.WEST (8/10/84)--------------------------------
20 REM This program will be used to give students practice in alphabetizing
30 REM words from the South Carolina Basic Skills Word List.
45 DIM WORD$(350)
50 KEY OFF
60 SCREEN 0
70 WIDTH 80
80 COLOR 15,1,1
90 CLS
100 LOCATE 9,30:PRINT "What is your name?"
110 COLOR 12:LOCATE 11,34:INPUT " ",N$
120 LN$=LEFT$(N$,1):LN=ASC(LN$):IF LN>=97 AND LN<=122 THEN LN=LN-32:LN$=CHR$(LN):XN=LEN(N$):N$=LN$+RIGHT$(N$,XN-1)
130 PRINT:PRINT:PRINT:PRINT
140 PRINT TAB(21) N$;:COLOR 15:PRINT;", you will need paper and pencil."
150 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
155 TONE=TIMER
160 COLOR 14:PRINT TAB(26) "PRESS SPACE BAR WHEN READY"
170 Q$=INKEY$:IF Q$<>" " THEN 170
175 TTWO=TIMER
180 CLS
185 GOSUB 1000
190 COLOR 15:LOCATE 5,29:PRINT"Ready, ";:COLOR 12:PRINT;N$;:COLOR 15:PRINT;" ?"
200 COLOR 15:LOCATE 7,27:PRINT "Here are five words."
210 LOCATE 8,15:PRINT"Let's see if you can put them in alphabetical order."
220 PRINT
230 PRINT
240 FOR X=1 TO 5
260 LOCATE ,33:PRINT A$(X)
270 NEXT X
280 PRINT:PRINT:PRINT:PRINT
290 LOCATE ,24:PRINT"Try it on your paper first."
300 PRINT
310 COLOR 14:LOCATE ,19:PRINT"When you are ready, press the space bar."
320 Q$=INKEY$:IF Q$<>" " THEN 320
330 COLOR 15
340 FOR X=2 TO 5
350 X$=A$(X)
360 FOR Y=X-1 TO 1 STEP-1
370 IF A$(Y)>X$ THEN SWAP A$(Y),A$(Y+1)
380 NEXT Y
390 NEXT X
400 CLS
410 PRINT:PRINT:PRINT
440 FOR X=1 TO 5
450 CNT=1
460 IF X=1 OR CNT=1 THEN GOTO 470
470 PRINT
480 LOCATE ,25:COLOR 6:PRINT "---------------------------":COLOR 15
490 PRINT:LOCATE ,25:PRINT"Type word";X;"and press enter."
500 PRINT
510 LOCATE ,25:INPUT " ",B$(X):LOCATE CSRLIN-1,26:PRINT B$(X);
520 IF B$(X)=A$(X) THEN 540
530 IF B$(X)<>A$(X) THEN GOTO 760
540 LOCATE ,42:COLOR 30:PRINT "Correct";
550 FOR K=1 TO 1000:NEXT K:LOCATE ,42:COLOR 14:PRINT "Correct":COLOR 15
560 NEXT X
570 PRINT
580 LOCATE ,25:COLOR 6:PRINT "---------------------------":COLOR 15
590 PRINT:PRINT:PRINT
600 FOR I=1 TO 1300:NEXT
610 CLS
620 COLOR 12:LOCATE 7,30:PRINT"Good work, ";N$;"!"
630 COLOR 15:LOCATE 9,30:PRINT"The correct list is: "
640 FOR Z=1 TO 5
650 PRINT:PRINT TAB(36) A$(Z)
660 NEXT Z
665 TONE=TIMER
670 PRINT:PRINT:LOCATE ,22:COLOR 14:PRINT "Press SPACE BAR to go on or E to end."
680 Q$=INKEY$:IF Q$<>" " AND Q$<>"e" AND Q$<>"E" THEN 680
685 TTWO=TIMER
690 IF Q$=" " THEN CLS: GOTO 180
700 CLS
710 COLOR 15:LOCATE 11,22: PRINT "I've enjoyed working with you, ";:COLOR 12:PRINT;N$;:COLOR 15:PRINT;"."
720 LOCATE 13,31:PRINT "Have a nice day!"
730 FOR X=1 TO 2500:NEXT X
750 COLOR 7,0:CLS:END
760 IF CNT=1 THEN CNT=2:LOCATE ,38:COLOR 2:PRINT"No, try again.":GOTO 480
770 COLOR 15
780 LOCATE CSRLIN +1,25:COLOR 7:PRINT"The correct word is ";:COLOR 12:PRINT A$(X);:COLOR 7:PRINT ".":GOTO 560
1000 REM -----------------------------input word list---------------------
1010 LST=350:OPEN "WORD.LST" FOR INPUT AS #1
1020 FOR T=1 TO LST:INPUT #1,WORD$(T):NEXT T:CLOSE #1
1030 FOR N=1 TO 5
1040 W=INT(LST*RND(TONE-TTWO*N))+1:A$(N)=WORD$(W)
1045 WORD$(W)=""
1050 IF A$(N)="" THEN 1040
1060 NEXT N
1110 CLS
1120 RETURN